﻿
Partial Class WebForm_ManagePerson
    Inherits System.Web.UI.Page

    Protected Sub SearchPerson1_Updating(ByVal source As Object, ByVal e As System.EventArgs) Handles SearchPerson1.Updating
        Me.InitDataForEditPerson()
    End Sub

    Protected Sub AddPerson1_Saved(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddPerson1.Saved
        Me.InitDataForSearchPerson()
    End Sub

    Protected Sub lknAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lknAdd.Click
        Me.InitDataForAddPerson()
    End Sub
End Class

Partial Class WebForm_ManagePerson
    Private Sub InitDataForSearchPerson()
        Me.TabContainer1.ActiveTab = Me.SearchPersonTabPanel
        Me.SearchPerson1.BindGV()
        'Me.SearchPerson1.BindGV(Me.AddPerson1.RegionID)
    End Sub

    Private Sub InitDataForAddPerson()
        Me.TabContainer1.ActiveTab = Me.AddPersonTabPanel
        Me.AddPerson1.Show()
    End Sub

    Private Sub InitDataForEditPerson()
        Me.TabContainer1.ActiveTab = Me.AddPersonTabPanel
        Me.AddPerson1.ShowEdit(Me.SearchPerson1.SelectedPersonID)
    End Sub
End Class

